<template>
    <div class="right-boxitem right-top">
        <div class="imgg">
            <img :src="user.url" class="img">
            <img :src="user.touxiang" class="touxiang">
            <div class="icondiv">
                <i class="iconfont icon--cool"></i>
                <span>无聊</span>
            </div>
        </div>
        <div class="content">
            <div class="title">
                {{ user.title }}
            </div>
            <div class="comment">
                {{ user.Bolog_sign }}
            </div>
            <div class="learnmove">
                <Router-link to="/myinfo">
                    <div class="learn">了解更多</div>
                </Router-link>
            </div>
        </div>
        <div class="foot">
            <i class="iconfont icon-QQ">
                <div class="qq"><img src="@/assets/img/qq.jpg"></div>
            </i>
            <i class="iconfont icon-weixin">
                <div class="qq"><img src="@/assets/img/wx.jpg"></div>
            </i>
        </div>
    </div>
</template>

<script setup>
import { onMounted, ref } from 'vue';

let props = defineProps({
    user: {
        type: Object,
        default: () => ({})
    }
})

</script>

<style lang="scss" scoped>
.right-top {
    margin-top: 0;
    height: 300px;

    @include userTheme {
        background-color: getThemeValue("rigthitemTopColor");
    }


    .imgg {
        width: 100%;
        height: 40%;
        border-radius: 15px;
        overflow: hidden;
        position: relative;

        .img {
            transition: all 0.5 ease-in-out;
            width: 100%;
            height: 100%;
            border-radius: 15px;

            &:hover {
                filter: saturate(2) drop-shadow(0 0 5px rgba(0, 0, 0, .66));
                transform: scale(1.1);
            }
        }

        .touxiang {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            height: 80px;
            width: 80px;
            border-radius: 50%;
        }

        .icondiv {
            @include userTheme {
                font-family: getThemeValue("fontfamily");
            }

            font-size: $font-size-s;
            position: absolute;
            top: 67%;
            left: 58%;
            background-color: aliceblue;
            border-radius: 8px;
            padding: 2px;
            color: rgb(163, 60, 184);

            span {
                display: none;
            }

            &:hover span {
                display: block;
            }
        }
    }

    .content {
        padding: 15px;
        height: 45%;
        width: 100%;

        @include userTheme {
            font-family: getThemeValue("fontfamily");
        }

        cursor: pointer;

        .title {
            font-size: $font-size-l;
            @include text-Onerow
        }

        .comment {
            font-size: $font-size-m;
            margin-top: 8px;
            padding-left: 10px;
            @include text-Onerow
        }

        .learnmove {
            margin-top: 15px;
            height: 30px;
            text-align: center;

            .learn {
                cursor: pointer;

                &:hover {

                    @include userTheme {
                        color: getThemeValue("hoverfontColor");
                    }
                }

                border-radius: 20px;
                padding: 10px;
                letter-spacing: 0.2em;
                @include userTheme {
                    background-color: getThemeValue("nowme");
                    }
                margin: 0 auto;
            }
        }

    }

    .foot {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: $font-size-l !important;
        height: 10%;

        i {
            margin: 10px;
            position: relative;

            &:hover .qq {
                display: block;
            }

            .qq {
                display: none;
                position: absolute;
                left: -100%;
                height: 80px;
                width: 80px;

                img {
                    width: 100%;
                    height: 100%;
                }
            }
        }
    }
}
</style>